<div class="level-up-notification">
  <div class="confetti"></div>
  <div class="level-up-text">Level Up!</div>
</div>

<div class="confetti-container">
  <div class="confetti">
    <i class="square" style="--speed: 10; --bg: yellow"></i>
    <i class="pentagram" style="--speed: 18; --bg: white"></i>
    <i class="rectangle" style="--speed: 29; --bg: green"></i>
    <i class="hexagram" style="--speed: 17; --bg: blue"></i>
    <i class="pentagram" style="--speed: 33; --bg: red"></i>
    <i class="dodecagram" style="--speed: 26; --bg: yellow"></i>
    <i class="wavy-line" style="--speed: 24; --bg: pink"> </i>
    <i class="wavy-line" style="--speed: 5; --bg: blue"></i>
    <i class="square" style="--speed: 40; --bg: white"></i>
    <i class="rectangle" style="--speed: 17; --bg: green"></i>
    <i class="square" style="--speed: 25; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="wavy-line" style="--speed: 15; --bg: yellow"> </i>
    <i class="pentagram" style="--speed: 32; --bg: yellow"></i>
    <i class="square" style="--speed: 25; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="dodecagram" style="--speed: 37; --bg: yellow"></i>
    <i class="wavy-line" style="--speed: 23; --bg: pink"></i>
    <i class="dodecagram" style="--speed: 37; --bg: red"></i>
    <i class="wavy-line" style="--speed: 37; --bg: pink"></i>
    <i class="hexagram" style="--speed: 36; --bg: white"></i>
    <i class="wavy-line" style="--speed: 32; --bg: green"></i>
    <i class="pentagram" style="--speed: 32; --bg: yellow"></i>
    <i class="square" style="--speed: 29; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="dodecagram" style="--speed: 37; --bg: red"></i>
    <i class="wavy-line" style="--speed: 23; --bg: pink"> </i>
    <i class="rectangle" style="--speed: 30; --bg: pink"></i>
    <i class="square" style="--speed: 30; --bg: red"></i>
    <i class="pentagram" style="--speed: 18; --bg: red"></i>
    <i class="rectangle" style="--speed: 19; --bg: green"></i>
    <i class="hexagram" style="--speed: 16; --bg: blue"></i>
    <i class="pentagram" style="--speed: 23; --bg: red"></i>
    <i class="dodecagram" style="--speed: 34; --bg: yellow"></i>
    <i class="wavy-line" style="--speed: 39; --bg: pink"></i>
    <i class="square" style="--speed: 40; --bg: purple"></i>
    <i class="rectangle" style="--speed: 21; --bg: green"></i>
    <i class="square" style="--speed: 14; --bg: white"></i>
    <i class="rectangle" style="--speed: 38; --bg: green"></i>
    <i class="dodecagram" style="--speed: 19; --bg: red"></i>
    <i class="wavy-line" style="--speed: 29; --bg: pink"> </i>
    <i class="hexagram" style="--speed: 21; --bg: white"></i>
    <i class="wavy-line" style="--speed: 17; --bg: purple"></i>
    <i class="pentagram" style="--speed: 32; --bg: yellow"></i>
    <i class="square" style="--speed: 23; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="dodecagram" style="--speed: 37; --bg: red"></i>
    <i class="wavy-line" style="--speed: 48; --bg: pink"> </i>
    <i class="rectangle" style="--speed: 38; --bg: pink"></i>
    <i class="pentagram" style="--speed: 13; --bg: red"></i>
    <i class="dodecagram" style="--speed: 49; --bg: yellow"></i>
    <i class="wavy-line" style="--speed: 19; --bg: cyan"></i>
    <i class="square" style="--speed: 15; --bg: steelblue"></i>
    <i class="square" style="--speed: 10; --bg: yellow"></i>
    <i class="pentagram" style="--speed: 18; --bg: white"></i>
    <i class="rectangle" style="--speed: 29; --bg: green"></i>
    <i class="hexagram" style="--speed: 17; --bg: blue"></i>
    <i class="pentagram" style="--speed: 33; --bg: red"></i>
    <i class="dodecagram" style="--speed: 26; --bg: yellow"></i>
    <i class="wavy-line" style="--speed: 24; --bg: pink"> </i>
    <i class="wavy-line" style="--speed: 5; --bg: white"></i>
    <i class="square" style="--speed: 40; --bg: purple"></i>
    <i class="rectangle" style="--speed: 17; --bg: green"></i>
    <i class="square" style="--speed: 25; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="wavy-line" style="--speed: 15; --bg: cyan"> </i>
    <i class="pentagram" style="--speed: 32; --bg: yellow"></i>
    <i class="square" style="--speed: 45; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="dodecagram" style="--speed: 37; --bg: red"></i>
    <i class="wavy-line" style="--speed: 23; --bg: pink"> </i>
    <i class="dodecagram" style="--speed: 37; --bg: red"></i>
    <i class="wavy-line" style="--speed: 37; --bg: pink"> </i>
    <i class="hexagram" style="--speed: 26; --bg: white"></i>
    <i class="wavy-line" style="--speed: 32; --bg: cyan"></i>
    <i class="pentagram" style="--speed: 32; --bg: yellow"></i>
    <i class="square" style="--speed: 45; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="dodecagram" style="--speed: 37; --bg: red"></i>
    <i class="wavy-line" style="--speed: 23; --bg: pink"> </i>
    <i class="rectangle" style="--speed: 50; --bg: pink"></i>
    <i class="square" style="--speed: 30; --bg: red"></i>
    <i class="pentagram" style="--speed: 18; --bg: red"></i>
    <i class="rectangle" style="--speed: 19; --bg: green"></i>
    <i class="hexagram" style="--speed: 16; --bg: blue"></i>
    <i class="pentagram" style="--speed: 23; --bg: red"></i>
    <i class="dodecagram" style="--speed: 33; --bg: yellow"></i>
    <i class="wavy-line" style="--speed: 39; --bg: white"></i>
    <i class="square" style="--speed: 40; --bg: orange"></i>
    <i class="rectangle" style="--speed: 21; --bg: green"></i>
    <i class="square" style="--speed: 14; --bg: white"></i>
    <i class="rectangle" style="--speed: 38; --bg: green"></i>
    <i class="dodecagram" style="--speed: 19; --bg: red"></i>
    <i class="wavy-line" style="--speed: 29; --bg: pink"> </i>
    <i class="hexagram" style="--speed: 34; --bg: white"></i>
    <i class="wavy-line" style="--speed: 17; --bg: indigo"></i>
    <i class="pentagram" style="--speed: 32; --bg: yellow"></i>
    <i class="square" style="--speed: 23; --bg: white"></i>
    <i class="rectangle" style="--speed: 18; --bg: green"></i>
    <i class="dodecagram" style="--speed: 37; --bg: red"></i>
    <i class="wavy-line" style="--speed: 48; --bg: pink"> </i>
    <i class="rectangle" style="--speed: 38; --bg: pink"></i>
    <i class="pentagram" style="--speed: 13; --bg: red"></i>
    <i class="dodecagram" style="--speed: 49; --bg: yellow"></i>
    <i class="wavy-line" style="--speed: 19; --bg: purple"></i>
    <i class="square" style="--speed: 15; --bg: cyan"></i>
  </div>
</div>
<style>
/* From Uiverse.io by JkHuger - Tags: notification */
.level-up-notification {
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #FDD835;
  border-radius: 10px;
  font-weight: bold;
  font-family: "Courier New", monospace;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: scale-up 1.5s ease-in-out forwards, fade-out 0.5s ease-in-out forwards 21.5s;
}

.level-up-text {
  text-align: center;
  color: #fff;
  font-size: 30px;
  padding: 12px 20px;
  font-weight: bold;
  text-shadow: 2px 2px #000;
}

@keyframes confetti {
  0% {
    transform: translateY(-50%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes scale-up {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.level-up-notification:hover {
  animation: none;
}

.level-up-notification:hover .confetti {
  animation: confetti 0.5s ease-in-out forwards;
}

/* asd */

.confetti-container {
  user-select: none;
  z-index: 10;
}

.confetti {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  /* width: 600px; */
  /* height: 600px; */
  /* overflow: hidden; */
}

.confetti .square {
  width: 1rem;
  height: 1rem;
  background-color: var(--bg);
  transform: rotate(-140deg);
}

.confetti .rectangle {
  width: 1rem;
  height: 0.5rem;
  background-color: var(--bg);
}

.confetti .hexagram {
  width: 0;
  height: 0;
  border-left: 0.5rem solid transparent;
  border-right: 0.5rem solid transparent;
  border-bottom: 1rem solid var(--bg);
  position: relative;
}

.confetti .hexagram:after {
  content: "";
  width: 0;
  height: 0;
  border-left: 0.5rem solid transparent;
  border-right: 0.5rem solid transparent;
  border-top: 1rem solid var(--bg);
  position: absolute;
  top: 0.33rem;
  left: -0.5rem;
}

.confetti .pentagram {
  width: 0rem;
  height: 0rem;
  display: block;
  margin: 0.5rem 0;
  border-right: 1rem solid transparent;
  border-bottom: 0.7rem solid var(--bg);
  border-left: 1rem solid transparent;
  transform: rotate(35deg);
  position: relative;
}

.confetti .pentagram:before {
  content: "";
  width: 0;
  height: 0;
  display: block;
  border-bottom: 0.8rem solid var(--bg);
  border-left: 0.3rem solid transparent;
  border-right: 0.3rem solid transparent;
  transform: rotate(-35deg);
  position: absolute;
  top: -0.45rem;
  left: -0.65rem;
}

.confetti .pentagram:after {
  content: "";
  width: 0rem;
  height: 0rem;
  display: block;
  border-right: 1rem solid transparent;
  border-bottom: 0.7rem solid var(--bg);
  border-left: 1rem solid transparent;
  transform: rotate(-70deg);
  position: absolute;
  top: 0.03rem;
  left: -1.05rem;
}

.confetti .dodecagram {
  background: var(--bg);
  width: 0.8rem;
  height: 0.8rem;
  position: relative;
}

.confetti .dodecagram:before {
  content: "";
  height: 0.8rem;
  width: 0.8rem;
  background: var(--bg);
  transform: rotate(30deg);
  position: absolute;
  top: 0;
  left: 0;
}

.confetti .dodecagram:after {
  content: "";
  height: 0.8rem;
  width: 0.8rem;
  background: var(--bg);
  transform: rotate(60deg);
  position: absolute;
  top: 0;
  left: 0;
}

.confetti .wavy-line {
  position: relative;
}

.confetti .wavy-line::after,
.confetti .wavy-line::before {
  content: "";
  height: 1rem;
  width: 8rem;
  background-size: 2rem 1rem;
  position: absolute;
  left: -9rem;
  transform: rotate(90deg);
}

.confetti .wavy-line::before {
  background-image: linear-gradient(
    45deg,
    transparent,
    transparent 50%,
    var(--bg) 50%,
    transparent 60%
  );
  top: 1rem;
}

.confetti .wavy-line::after {
  background-image: linear-gradient(
    -45deg,
    transparent,
    transparent 50%,
    var(--bg) 50%,
    transparent 60%
  );
}

.confetti i {
  width: 3rem;
  height: 3rem;
  margin: 0 0.2rem;
  animation-name: confetti;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: calc(70s / var(--speed));
}

.confetti i:nth-child(even) {
  transform: rotate(90deg);
}

@keyframes confetti {
  0% {
    transform: translateY(-500px);
  }

  100% {
    transform: translateY(500px);
  }
}

</style>
